<?php

namespace App\Models;


class SurveyTemplate extends Orm
{
    //

    protected $table = 'survey_template';
    protected $dateFormat = 'U';
    public $timestamps = true;

    public function setValAssignAttribute($value)
    {
        $this->attributes['val_assign'] = json_encode(array_values($value));
    }

    public function getValAssignAttribute($value)
    {
        return array_values(json_decode($value, true) ?: []);
    }
}
